import Vue from 'vue'
import VueRouter from 'vue-router'
import About from '../components/About.vue'
import Home from '../components/Home.vue'
import Movie from '../components/Movie.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes:[
    {path:'/',redirect:'/home'},
    {path:'/home',component:()=>import('@/components/Home.vue')},
    {path:'/movie/:id',component:()=>import('@/components/Movie.vue')},
    {
      path:'/about',
      component:()=>import('@/components/About.vue'),
      children:[
        {path:'tab1',component:()=>import('@/components/tabs/Tab1')},
        {path:'/about/tab2',component:()=>import('@/components/tabs/Tab2')}
      ]
    }
  ]
  
})

export default router